import { MenuTypes } from './components/mainNavBar';
import NotFoundPage from '@src/page/NotFoundPage';
import GenDetailPage from '@src/page/code/gen/genDetailPage';
import GenListPage from '@src/page/code/gen/genListPage';
import DictDetailPage from '@src/page/system/dict/dictDetailPage';
import DictListPage from '@src/page/system/dict/dictListPage';
import MenuListPage from '@src/page/system/menu/menuListPage';
// 页面配置
// 列表或基本页面用 routedata.path/children.path/index 后面跟index
// 详情页面 用  routedata.path/children.path/detail 后面跟detail
const componentsMap: { [x: string]: (arg?: MenuTypes) => JSX.Element } = {
'/code/gen/detail': (arg) => <GenDetailPage currentRouteRecord={arg!} />,
'/code/gen/index': (arg) => <GenListPage currentRouteRecord={arg!} />,
'/system/dict/detail': (arg) => <DictDetailPage currentRouteRecord={arg!} />,
'/system/dict/index': (arg) => <DictListPage currentRouteRecord={arg!} />,
'/system/menu/index': (arg) => <MenuListPage currentRouteRecord={arg!} />,
any: () => <NotFoundPage loading={false} />,
};
export default componentsMap;